﻿@model IEnumerable<BaseballGame.Models.Player>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            ab
        </th>
        <th>
           r
        </th>
        <th>
            h
        </th>
        <th>
            rbi
        </th>
        <th>
            hr
        </th>
        <th>
            bb
        </th>
        <th>
            so
        </th>
        <th>
            sb
        </th>
        <th>
            lob
        </th>
        <th>
            avg
        </th>
        <th>
            ip
        </th>
        <th>
            ra
        </th>
        <th>
            er
        </th>
        <th>
            hra
        </th>
        <th>
            whip
        </th>
        <th>
            era
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.at_bat)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.runs)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.hits)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.runs_batted_in)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.home_runs)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.balls_on_balls)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.strike_outs)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.stolen_bases)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.left_on_base)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.batting_avg)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.innings_pitched)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.runs_allowed)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.earned_runs_allowed)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.home_runs_allowed)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.walks_hit_by_ip)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.earned_runs_average)
        </td>
        <td>
            @Html.ActionLink("Details", "../ManageTeam/PlayerDetails", new { id=item.Id }) 
        </td>
    </tr>
}
</table>
